Block distortion reduction method and device and encoding method and device

ABSTRACT

An apparatus incorporates encoding-degree-of-difficulty detecting means  3  for detecting a parameter indicating an encoding degree of difficulty from supplied image data; parameter calculating means  4  for calculating a parameter required to determine block distortion from supplied image data; block distortion determining means  6  for determining block distortion in accordance with a result of detection of the parameter indicating the encoding degree of difficulty and a result of the calculation for obtaining the parameter; correction-value calculating means  7  for calculating a correction value for reducing block distortion; and means for subjecting supplied image data to a correction using a correction value corresponding to a result of the determination of block distortion so as to produce an output.

TECHNICAL FIELD

The present invention relates to a method and an apparatus for reducingblock distortion occurring in block encoding with which input data, suchas still image data or moving image data, is formed into blocks so as tobe subjected to a DCT encoding process and to a method and an apparatusfor encoding data while the block distortion is reduced.

BACKGROUND ART

Hitherto, as an encoding method for efficiently compressing and encodingstill image data, moving image data or the like, a block encodingmethod, such as block DCT (Discrete Cosine Transformation) method, hasbeen known.

When image data or the like is compressed/expanded by the block encodingmethod, block distortion (block noise) sometimes occurs. In proportionto the compression ratio, distortion easily occurs. Since the DCTencoding process is arranged to perform transformation in a closed spacein a block and no consideration is made about correlation across theblock boundary, continuity across the block boundary cannot bemaintained. Thus, deviation of the value of reproduced data occurring ina boundary region from an adjacent block is perceptible as noise. Sinceblock distortion occurring when image data is block-encoded has acertain type of regularity, the foregoing block distortion is moreperceptible as compared with usual random noise. Therefore, theforegoing distortion considerably deteriorate the image quality.

To reduce block distortion, document “NOISE ELIMINATING FILTER ON THEBASIS OF MC-DCT CODING METHOD”, Ida and Datake, 7-35, theses forlectures in Spring National Meeting of Electronic Information Society,1990, has disclosed a technique in which edges which are originalinformation of an image is preserved. Moreover, noise of the edges areeliminated by using quantized steps to determine whether the filter isturned on or off. Moreover, the processing direction is changed toperform a plurality of processes. Moreover, document “CHARACTERISTICS OFADAPTIVE NOISE ELIMINATING FILTER IN BLOCK-ENCODING OF IMAGE”, Izawa,Vol. 74, pp. 89-100, transactions of Department of Engineering, ShinshuUniversity, has disclosed a technique in which also peripheral blocksare extracted so as to be subjected to DCT process so that noisefrequency components are removed.

However, the former method in which the noise eliminating filter isturned on or off has a problem in that high-frequency components of theimage are omitted and thus the resolution deteriorates though theprocess can easily be performed.

The latter method in which the adaptive noise eliminating filter isemployed is able to effectively reduce block distortion while theresolution is maintained. However, a complicated process must beperformed and thus cost reduction cannot be performed. Therefore, theforegoing method is not a preferred method for consumer appliances.

What is worse, there arises a problem in that the block distortioncannot completely be reduced because of an incorrect determination ofthe block distortion. Another problem arises in that an edge iserroneously corrected, causing pseudo edge to be formed.

The rate of bit streams encoded by the block encoding method issometimes converted into different bit-rate bit stream from, forexample, 8 Mbps to 4 Mbps in order to be adaptable to, for example, anapparatus set to a different bit rate.

When the rate of bit streams encoded by the block encoding method isconverted so as to be again encoded, the encoding process is as it isperformed even if block noise occurs in an image decoded by a decoder.

Therefore, when a motion vector is detected such that motioncompensation is employed to perform prediction encoding in a case ofre-encoding or format conversion, the accuracy to detect the motionvector deteriorates because of disturbance made by block noise.

The position at which block noise occurs depends on the position of theboundary between blocks. Therefore, when re-encoding or encoding forformat is performed by using an encoding method in which the positionsof the boundaries between blocks are the same such that block noise inan image in which block noise occurs is not eliminated, there arises aproblem in that the block noise is furthermore highlighted in thereproduced image.

The method of block-encoding image data is exemplified by MPEG (MovingPicture Experts Group) formed by combining the DCT which usescorrelation in an image, the motion compensation using correlationbetween frames and Huffinan encoding which uses the correlation of codestrings.

DISCLOSURE OF THE INVENTION

In view of the foregoing, an object of the present invention is toprovide a method and an apparatus for reducing block distortion whichrequires a simple process and with which omission of high-frequencycomponents can be reduced, reduction or elimination of block distortioncan stably be performed, an incorrect determination occurring when blockdistortion is determined can be reduced, deterioration in an accuracy todetect motion vector which takes place when re-encoding is performed canbe reduced and block noise can be reduced and to provide an encodingmethod and an encoding apparatus which are capable of reducing blocknoise.

To achieve the above-mentioned objects, according to one aspect of thepresent invention, there is provided a method of reducing blockdistortion which occurs when image data is block-encoded, the methodcomprising the steps of: detecting, from input image data, a parameterindicating a degree of difficulty in encoding; calculating, from inputimage data, a parameter required to determine block distortion;determining the block distortion in accordance with a result ofdetection of the parameter indicating the degree of difficulty inencoding and a result of the calculation of the parameter; calculating acorrection value for reducing the block distortion; and correcting inputimage data with a correction value which corresponds to a result of thedetermination of the block distortion so as to produce an output.

When the parameter obtained from input image data and indicating thedegree of difficulty in encoding is used to determine block distortionfor the purpose of reducing the block distortion, the determination caneffectively be performed and incorrect determination can be reduced.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing an example of the structure of ablock-distortion reducing apparatus according to a first embodiment ofthe present invention;

FIG. 2A is a graph showing the relationship between values of motionvector difference MV of a sample which can easily be encoded and thenumber of samples;

FIG. 2B is a graph showing the relationship between values of motionvector difference MV of a sample which cannot easily be encoded and thenumber of samples;

FIG. 3A is a graph showing the relationship between values of IDCTcoefficients of samples which can easily be encoded and the number ofsample;

FIG. 3B is a graph showing the relationship between values of IDCTcoefficients of samples which cannot easily be encoded and the number ofsample;

FIG. 4 is a diagram showing an example of calculations for obtaining anIDCT coefficient and a motion vector difference MV in one frame;

FIG. 5 is a diagram showing an example of a method of obtaining anencoding degree of difficulty in a block boundary in a verticaldirection;

FIG. 6 is a diagram showing pixels in the vicinity of a DCT blockboundary for describing a method of obtaining the degree of verticalcorrelation;

FIG. 7 is a diagram showing pixels in the vicinity of a block boundaryfor correcting block distortion;

FIG. 8 is a block diagram showing the schematic structure of anapparatus for reducing block distortion of image data according to asecond embodiment of the present invention;

FIG. 9 is a block diagram showing the schematic structure of a decodersystem incorporating the apparatus for reducing block distortion ofimage data according to the second embodiment of the present invention;

FIG. 10 is a flow chart of a process of a block distortion reduceivemethod according to the second embodiment of the present invention;

FIG. 11 is a flow chart of the operation of an edge extracting process;

FIG. 12 is a diagram showing an example of coefficients of Laplacianfilter;

FIG. 13 is a flow chart of the operation of a motion detecting process;

FIG. 14 is a flow chart showing an example of the operation of a blockdistortion determining process;

FIG. 15 is a flow chart of an example of the operation for extracting anedge by one-dimensional secondary differentiation;

FIG. 16 is a block diagram showing the schematic structure of theapparatus for reducing block distortion of image data when the edgeextraction shown in FIG. 15 is performed;

FIG. 17 is a diagram showing a block-distortion reducing process whichis performed when the brightness of each pixel is monotonously decreasedacross a block boundary and the brightness is raised at only the blockboundary;

FIG. 18 is a diagram showing a block distortion reducing process towhich an edge formed in a region except for the block boundary issubjected;

FIG. 19 is a diagram showing a block-distortion reducing process whichis performed when pixels indicating an edge which is detected as blockdistortion exist in parallel with the block boundary;

FIG. 20 is a diagram showing a correction process which is performed forthe purpose of reducing an edge which is newly formed after thecorrection;

FIG. 21 is a diagram showing an example of the block distortion reducingmethod;

FIG. 22 is a flow chart of a block-distortion reducing process which isperformed by a block-distortion reducing apparatus according to thefirst embodiment;

FIG. 23 is a flow chart of a special process during a block-distortionreducing process;

FIG. 24 is a block diagram showing a system for eliminating block noisebefore re-encoding is performed;

FIG. 25 is a block diagram showing an adaptive block noise eliminatingmethod; and

FIG. 26 is a block diagram of a structure for processing an analogsignal which has been D/A converted after a decoding process has beenperformed.

BEST MODE FOR CARRYING OUT THE INVENTION

Embodiments of the present invention will now be described withreference to the drawings.

FIG. 1 shows the schematic structure of a block-distortion reducingapparatus 1 according to a first embodiment. The block-distortionreducing apparatus 1 shown in FIG. 1 is an example of an apparatus whichincludes an MPEG decoder for decoding a MPEG bit stream. That is, theblock-distortion reducing apparatus 1 reduces block distortion whichtakes place in image data subjected to a decoding process in the MPEGdecoder.

The block-distortion reducing apparatus 1 incorporates an MPEG decoder 2for subjecting supplied image data to the decoding process; anencoding-degree-of-difficulty evaluation circuit 3 for evaluating anencoding degree of difficulty of image data subjected to the decodingprocess; a parameter calculating circuit 4 for calculating a parameterrequired to determine block distortion; a vertical correlation detectingcircuit 5 for detecting the correlation of image data in the verticaldirection; a block-distortion determining circuit 6 for determining astate of block distortion of image data; and a block-distortioncorrection circuit 7 for correcting block distortion of image data.

The MPEG bit stream is supplied to the MPEG decoder 2. The MPEG decoder2 subjects data in the supplied bit stream to inverse quantization andinverse DCT (discrete cosine transformation) so that data is decoded. Atthis time, the MPEG decoder 2 decodes data in DCT block units each ofwhich is composed of a plurality of macro blocks. The MPEG decoder 2detects an IDCT (inverse DCT) coefficient and motion vector differenceMV obtained as a result of the decoding process so as to produce anoutput to the encoding-degree-of-difficulty evaluation circuit 3 and theblock-distortion correction circuit 7.

The encoding-degree-of-difficulty evaluation circuit 3 uses the motionvector difference MV and the IDCT coefficient supplied from the MPEGdecoder 2 to generate a parameter Kp indicating the encoding degree ofdifficulty of image data. The motion vector difference MV is adifference of the motion vector included in the bit stream supplied tothe MPEG decoder 2. The IDCT coefficient is a coefficient obtainablefrom inverse DCT after inverse quantization of the DCT coefficientincluded in the bit stream supplied to the MPEG decoder 2.

The motion vector difference MV and the IDCT coefficient have therelationship as shown in FIGS. 2A, 2B, 3A and 3B to correspond to thedegree of complexity of an image indicated by input image data. FIGS. 2Aand 3A show the motion vector difference MV and the IDCT coefficient ofa first sample (yashi) generally having a high encoding degree ofdifficulty. FIGS. 2B and 3B show the motion vector difference MV and theIDCT coefficient of a second sample (flower) generally having a lowencoding degree of difficulty.

As shown in FIGS. 2A, 2B, 3A and 3B, in complicated macro blocks inwhich motion is active and macro blocks including high-frequencycomponents, the motion vector difference MV and IDCT coefficientobtained by the MPEG decoder 2 have large values, as shown in FIGS. 2Aand 3A. In moderate macro blocks in which motion is monotonous and macroblocks in which high-frequency components are few in number, the motionvector difference MV and the IDCT coefficient obtained by the MPEGdecoder 2 have small values, as shown in FIGS. 2B and 3B.

Therefore, when the motion vector difference MV and the IDCT coefficientobtained by the MPEG decoder 2 are large, theencoding-degree-of-difficulty evaluation circuit 3 determines that thedegree of difficulty in encoding high. Therefore, theencoding-degree-of-difficulty evaluation circuit 3 sets the parameter Kpindicating the encoding degree of difficulty to a large value. In FIGS.2A, 2B, 3A and 3B, description has been made about only B-picture andP-picture by using the motion vector difference MV and the IDCTcoefficient. As for I-picture, only the IDCT coefficient is used to setthe parameter Kp indicating the encoding degree of difficulty.

When the encoding-degree-of-difficulty evaluation circuit 3 sets theparameter Kp for image data in one frame, theencoding-degree-of-difficulty evaluation circuit 3 calculates the motionvector difference MV and the IDCT coefficient for each macroblock whenthe macro blocks are arranged as shown in FIG. 4. For example, theencoding-degree-of-difficulty evaluation circuit 3 calculates, forexample, the following equation for macroblock MB0:

MB0=(MB0+MB1+MB2+MB3+MB4+MB5+MB6+MB7+MB8)/9

That is, when the motion vector difference MV and the IDCT coefficientfor the macroblock MB0 shown in FIG. 4 are calculated, also the adjacentmacro blocks MB1 to MB8 are considered.

The encoding-degree-of-difficulty evaluation circuit 3 calculates theparameter Kp indicating the encoding degree of difficulty of the blockboundary in the vertical direction. At the macroblock boundary which isthe block boundary between macro blocks, the IDCT coefficient and themotion vector difference MV of both of the macro blocks are calculatedso that the parameter Kp indicating the encoding degree of difficulty iscalculated. At the block boundary, the IDCT coefficient and the motionvector difference MV of the macroblock are as it is employed as theparameter Kp indicating the encoding degree of difficulty. The verticalcorrelation detecting circuit 5 decodes the level of correlation of theedge in a direction along the block boundary. The parameter Kp is set toa multiplicity of values in a range from 0 to 1 so as to be enlarged inproportion to the encoding degree of difficulty.

That is, a supplied brightness signal is supplied to a HPF (High-PassFilter) in the edge extracting portion so that secondary differentiationfor detecting an edge is performed. For example, the Laplacian is usedto extract edge elements. A signal indicating a result of edgeextraction by the HPF is supplied to a maximum-value extracting portion.To obtain a threshold value which is necessary for the followingbinary-coding portion, a maximum value is detected in an edge extractingblocks across the block boundary. The binary coding portion receives thethreshold value obtained by the maximum value extracting portion and thesignal indicating a result of the edge extraction performed by the HPF.In accordance with the threshold value, the signal is binary-coded. TheHPF, the edge extracting portion, the maximum value extracting portionand the binary-coding portion will be described later.

The vertical correlation detecting circuit 5 obtains the level of thevertical correlation of the thus-extracted edge component at the blockboundary. An example of a method of obtaining the level of the verticalcorrelation will now be described with reference to FIG. 6.

Referring to FIG. 6, division is made into region b including a blockboundary of interest and regions a and c adjacent to the region b. Thenumber of the extracted edge components is calculated for each region.The obtained numbers are made to be Ea, Eb and Ec. In FIG. 6, pixelsextracted as edges are expressed as 1 and pixels determined that thepixels are not edges are expressed as 0. In this embodiment, Ea =5,Eb=12and Ec=5.

The vertical correlation detecting circuit 5 may produce an output ofthe detected level of the vertical correlation as the degree ofdifficulty when the level of the detection of the correlation is encodedto the block-distortion correction circuit 7 as well as the output tothe block-distortion determining circuit 6. That is, a consideration ismade that the encoding degree of difficulty is raised in proportion tothe level of the vertical correlation which is detected by the verticalcorrelation detecting circuit 5. Thus, a parameter corresponding to thevertical correlation is supplied to the block-distortion correctioncircuit 7. Thus, the correction value calculated by the block-distortioncorrection circuit 7 is multiplied with the supplied parameter.

Ratio Kv of the number of edge components in the region including theblock boundary and that in another region is obtained so as to beclassified.

For example,

When Kv≧4 Class 1

When 2≦Kv<4 Class 2

When 1≦Kv<2 Class 3

When Kv<1 Class 4

Since Kv=(2×12)/(5+5)=2.4 in an example shown in FIG. 16, the class isClass 2.

The role of the block-distortion determining circuit 6 will now bedescribed. Weighting factor Kc is assigned to correspond to each class.The weighting factor Kc for each class is exemplified as follows:

Class Weighting Factor Kc 1 1 2 0.75 3 0.5 4 0.25

Therefore, when the level of the vertical correlation at the blockboundary is high, an amount of correction is enlarged. Therefore, blockdistortion can effectively be removed. That is, the accuracy to detectthe block distortion can be improved.

As shown in FIG. 1, image data subjected to the decoding process issupplied to the block-distortion determining circuit 6 from the MPEGdecoder 2.

Pixels for use to determine the block distortion will now be describedwith reference to FIG. 7. In an example shown in FIG. 7, the DCT endingis employed in block encoding and a specific example of a subject whichmust be processed is shown in a case where a DCT block is composed by8×8 pixels. That is, when five pixels from the block boundary of each ofthe left and right DCT blocks 51L and 51R shown in the drawings to theright and left are used in a process for reducing the block distortionand when four pixels from each of the block boundary are included in arange which must be corrected, an edge extraction block 52 is an 8×8block around the block boundary. A block-distortion correction block 53is a block in the edge extraction bock 52 composed of 8 pixels upper byone line.

The block-distortion determining circuit 6 calculates a parameterrequired to determine the block distortion. The block-distortiondetermining circuit 6 calculates boundary difference |tmp0|, activity|tmp| and adjacent difference |diff| from the following equations as theparameters:

|tmp0|=|f-e|

|tmp|=(|b-a|+|c-b|+|d-c|+|e-d|+|g-f|+|h-g|+|i-h|+|j-i|)/8

|diff0|=|b-a|

|diff1|=|c-b|

|diff2|=|d-c|

|diff3|=|e-d|

|diff4|=|g-f|

|diff5|=|h-g|

|diff6|=|i-h|

|diff7|=|j-i|

As can be understood from the foregoing equations, the boundarydifference |tmp0| is an absolute value of the difference betweenadjacent pixels e and f across the boundary of the DCT block shown inFIG. 7. The activity |tmp| is an average value of the absolute value ofthe difference between adjacent pixels (except for a region between eand f) of the block distortion processing block 53. The adjacentdifference |diff| is an absolute value of each of the differencesbetween pixels c and d, between d and e, between f and g and between gand h. The block-distortion determining circuit 6 produces an output ofeach of the parameters to the block-distortion correction circuit 7.

The block-distortion determining circuit 6 uses the parameter Kpsupplied from the encoding-degree-of-difficulty evaluation circuit 3,each parameter supplied from the parameter calculating circuit 4 and theweighting factor Kc supplied from the vertical correlation detectingcircuit 5 to determine whether or not block distortion exists. Moreover,the block-distortion correction circuit 7 has threshold value det_th foruse to determine whether or not the block distortion correction isperformed.

Specifically, the block-distortion determining circuit 6 determines thatthe block boundary has a stepped portion when |tmp0|>|tmp| is satisfied.The block-distortion determining circuit 6 determined that the blockboundary has not edge when |tmp0|<det_th is satisfied. When adetermination is made that |tmp0|≦|diff3| and |tmp0|≦|diff4| aresatisfied, the block-distortion determining circuit 6 determines that noedge exists on the two sides of the block boundary.

The block-distortion determining circuit 6 uses the weighting factor Kcand Kp so as to change the threshold value det_th for determining blockdistortion correction. Then, the block-distortion determining circuit 6turns a flag corresponding to the result of the determination on so asto control the block-distortion correction circuit 7.

The block-distortion correction circuit 7 uses the flag turned on by theblock-distortion determining circuit 6, the parameter Kp supplied fromthe encoding-degree-of-difficulty evaluation circuit 3 and the weightingfactor Kc supplied from the vertical correlation detecting circuit 5 soas to calculate a correction value with which image data having theblock distortion is corrected. Moreover, the block-distortion correctioncircuit 7 has a threshold value corr_th for use to correct the blockdistortion. In accordance with the characteristics of the image, inparticular, the linearity of the same, the block-distortion correctioncircuit 7 obtains, from the adjacent difference, boundary step |step|after the correction from the following equation:

|step|=|diff3+diff4|/2

Then, a correction amount |σ| required to realize the foregoing blockstep |step| after the correction is obtained from the followingequation:

|σ|=(|tmp0|−|step|)/2.

It is preferable that the above-mentioned boundary difference |tmp0| isdetermined with the parameter threshold value corr_th so as to switchthe intensity of the correction. In the foregoing case, when|tmp0|<corr_th is satisfied and the intensity of the correction is high(intense correction), the correction amount |σ| is made to be asfollows:

|σ|=(|tmp0|−|step|)/2

When |tmp0|≦corr_th is satisfied and the intensity of the correction islow (weak correction), the correction amount |σ| is halved as follows:

|σ|=(|tmp0|−|step|)/4

The correction is performed as described above. The block-distortioncorrection circuit 7 may calculate |σ| with the weighting factor Kc andthe parameter Kp so as to determine the correction amount |σ| inconsideration of the IDCT coefficient, the motion vector difference MVand the vertical correlation. The block-distortion correction circuit 7may change the threshold value corr_th in accordance with Kc and Kp.

Since there is apprehension that an incorrect determination is made inthe block distortion determination if the boundary difference |tmp0| islarger than the parameter threshold value corr_th though an edge existsin the block boundary, the incorrect correction must be reduced.Therefore, the intensity of the correction is switched between intenseand weak.

In accordance with the obtained correction amount |σ|, theblock-distortion correction circuit 7 obtains a correction value foreach pixel. To smooth the seam with an adjacent correction range, andsince the block distortion becomes intense in the portion adjacent tothe boundary, a correction value in inverse proportion to the distancefrom the boundary is obtained in accordance with the following equation.

Specifically, when correction value are |σ_(b)| to |σ_(i)| for pixels bto i in the correction range 53 shown in FIG. 6, the foregoingcorrection value |σ| is used to obtain the following correction values:

|σ_(e)|=|σ|, |σ_(f)|=|σ|

|σ_(d)|=|σ|/2, |σ_(g)|=|σ|/2

|σ_(c)|=|σ|/4, |σ_(h)|=|σ|/4

|σ_(b)|=|σ|/8, |σ_(i)|=|σ|/8

Then, the block-distortion correction circuit 7 uses the correctionvalues |σ_(b)| to |σ_(i)| for the pixels b to i so as to obtain imagesignals (image data) SB_(b) to SB_(i) which have been subjected to theblock distortion correction.

Specifically, when input image data for the pixels b to i before thecorrection are S_(b) to S_(i), the block-distortion correction circuit 7performs correction of image data supplied from the MPEG decoder 2 suchthat corrected image data SB_(b) to SB_(i) are made as follows tocorrespond to the sign of tmp0:

tmp0≧0: SB_(b)=S_(b)+|σ_(b)|, tmp0<0: SB_(b)=S_(b)−|σ_(b)|

tmp0≧0: SB_(c)=S_(c)+|σ_(c)|, tmp0<0: SB_(c)=S_(c)−|σ_(c)|

tmp0≧0: SB_(d)=S_(d)+|σ_(d)|, tmp0<0: SB_(d)=S_(d)−|σ_(d)|

tmp0≧0: SB_(e)=S_(e)+|σ_(e)|, tmp0<0: SB_(e)=S_(e)−|σ_(e)|

tmp0≧0: SB_(f)=S_(f)−|σ_(f)|, tmp0<0: SB_(f)=S_(f)+|σ_(f)|

tmp0≧0: SB_(g)=S_(g)−|σ_(g)|, tmp0<0: SB_(g)=S_(g)+|σ_(g)|

tmp0≧0: SB_(h)=S_(h)−|σ_(h)|, tmp0<0: SB_(h)=S_(h)+|σ_(h)|

tmp0≧0: SB_(i)=S_(i)−|σ_(i)|, tmp0<0: SB_(i)=S_(i)+|σ_(i)|

Therefore, the above-mentioned block-distortion reducing apparatus 1 isable to determine the block distortion and correct the block distortionby using the IDCT coefficient and the motion vector difference MVsupplied from the MPEG decoder 2 and the parameter Kp indicating theencoding degree of difficulty. Therefore, block distortion can stably bereduced or eliminated. Moreover, incorrect determination of the blockdistortion can be reduced.

FIG. 8 is a block diagram showing the schematic structure of ablock-distortion reducing apparatus 10 according to a second embodiment.Note that the block distortion reduction is also called a blockdistortion elimination or block noise elimination.

Referring to FIG. 8, input terminals 11 and 12 are supplied with animage signal subjected to image encoding including block encoding andthen decoded, a chroma signal of image data and a brightness signal.Image encoding including block encoding is exemplified by a so-calledMPEG encoding standard. The MPEG is an abbreviation of an organization(Moving Picture Experts Group) for investigating of dynamic imagecompression encoding of ISO/IEC JTC1/SC29 (International Organizationfor Standardization/International Electrotechnical Commission, JointTechnical Committee 1/Sub Committee 29: International StandardizationOrganization/International Electronic Standard Conference, AssociatedTechnical Committee/Expert Department 29). As MPEG 1 standard, ISO11172is employed, while ISO13818 is employed as MPEG 2 standard. In theabove-mentioned international standards, ISO11172-1 and ISO13818-1 havebeen standardized in a category of multimedia multiplexing. In addition,ISO11172-2 and ISO13818-2 have been standardized in the category ofimage. Moreover, ISO11172-3 and ISO13818-3 have been standardized in acategory of sound.

The foregoing image compression and encoding standard ISO11172-2 orISO13818-2 has a structure that an image is compressed and encoded inpicture (frame or field) units by using the correlation in a period oftime or a spatial direction of an image. The use of the correlation inthe spatial direction is realized by using block DCT encoding.

As described above, the compression and encoding process including, forexample, block DCT encoding is performed so as to be serial-transmittedfor recorded/reproduced. Then, chroma (color) components and brightnesscomponents of image signal data subjected to the inverse DCT in thedecoder are supplied to a chroma-signal input terminal 11 and abrightness signal input terminal 12 shown in FIG. 8.

The chroma (color) components of image data supplied to thechroma-signal input terminal 11 are extracted from a chroma-signaloutput terminal 40 through a delay circuit 14. The delay circuit 14delays time of the brightness component required for the blockdistortion reducing process so that timing of the output brightnesscorrection and that of the chroma component are made coincide with eachother.

A HD.VD input terminal 13 is supplied with a horizontal synchronizingsignal and a vertical synchronizing signal so as to be supplied to acontrol-signal generating portion 26 so that timing signals required forthe circuits are generated.

The brightness signal supplied from the terminal 12 is transmitted to acorrection-signal calculating portion 15, a parameter calculatingportion 16, an edge extracting portion 17, a selection switch 19 and amotion detecting portion 20.

The correction-signal calculating portion 15 transmits the suppliedbrightness signal to an adder 31 and a correction-value calculatingportion 32. The correction-value calculating portion 32 predictinclination after the correction in accordance with the adjacentdifference between two adjacent pixel across the boundary so as toobtain a correction value. In accordance with information about whetherthe correction is intense or weak communicated from the block-distortiondetermining portion, the correction-value calculating portion 32 obtainsa corresponding degree of correction. Moreover, the correction-valuecalculating portion 32 obtains a correction value for each pixel ininverse proportion to the distance of the boundary. A correction valueobtained by the correction-value calculating portion 32 is supplied tothe adder 31 so as to be added to the above-mentioned input brightnesssignal.

The supplied brightness signal is supplied to a HPF (High-Pass Filter)34 of the edge extracting portion 17 so that secondary differential fordetecting edge elements is performed. In the second embodiment, forexample, the Laplacian is employed to extract edge elements. A signalindicating a result of edge extraction in the HPF 34 is supplied to amaximum-value extracting portion 35. To obtain a threshold valuerequired for the following binary-coding circuit 36, a maximum value isdetected in an edge extracting block across the block boundary.

The binary-coding circuit 36 is supplied with the threshold valueobtained by the maximum-value extracting portion 35 and the signalindicating a result of edge element extraction performed by the HPF 34.In accordance with the threshold value, the binary-coding circuit 36binary-codes the signal. A Huffinan conversion portion 37 performsHuffinan conversion in the edge extracting blocks across the blockboundary in accordance with the binary-coded signal. Thus, the edgeelements are mapped to a parameter space (ρ, θ) so that a straight line(ρ0, θ0) in the block is obtained. The obtained ρ0 and θ0 are suppliedto the block-distortion determining portion 18.

The brightness signal supplied from the terminal 12 is supplied to aparameter calculating circuit 33 of the parameter calculating portion 16so that a parameter in the correction block required for theblock-distortion determining portion 18 is obtained.

The supplied brightness signal is supplied to a memory 22 of the motiondetecting portion 20 so that writing is performed under control of thememory controller 21. A brightness signal in the previous field readfrom the memory by the memory controller 21 is supplied to a patternmatching portion 23. Thus, pattern matching with the supplied brightnesssignal is performed. A result of the calculations for performing patternmatching is supplied to a vector determining portion 24 so that thedegree of the motion is determined. Information whether or not motionexists is supplied to the block-distortion determining portion 18.Moreover, the motion detecting portion 20 may detect the motion vectordifference MV to produce, to the block-distortion determining portion 18and a correction-value calculating portion 32, an output of the same asa parameter indicating the encoding degree of difficulty in accordancewith the motion vector difference MV.

The block-distortion determining portion 18 uses the straight linecomponent (ρ0, θ0) communicated from the edge extracting portion, theparameter in the correction block communicated from the parametercalculating portion and the degree of motion communicated from themotion vector detecting portion to determine whether or not blockdistortion occurs and whether the block-distortion correction value iscontrolled (weak) or not (intense). Then, the block-distortiondetermining portion 18 supplies an intense correction/weak correctionsignal to the correction-value calculating portion 32 of thecorrection-signal calculating portion 15. Moreover, the block-distortiondetermining portion 18 supplied correction ON/OFF signal to a controlterminal of the selection switch (a selector) 19.

The supplied brightness signal is supplied to the adder 31 of thecorrection-signal calculating portion 15 so that the brightness signaland the correction value obtained by the correction-value calculatingportion 32 are added to each other. Thus, a signal indicating a resultof removal of the block distortion is obtained, the signal being thensupplied to the selection switch (the selector) 19.

The selector 19 selects whether the supplied brightness signal is as itis transmitted or a corrected signal is transmitted in response to ablock distortion ON/OFF signal supplied from the block-distortiondetermining portion 18.

On the other hand, the supplied chroma signal is supplied to the delaycircuit 14 so that delay from the brightness signal which passes througha correction circuit is corrected.

Another method may be employed in which the selector 19 is not employedsuch that the correction signal which is an output of thecorrection-value calculating portion 32 is made to be zero when theblock distortion ON/OFF signal supplied from the block-distortiondetermining portion 18 is OFF.

Although the noise eliminating apparatus according to the secondembodiment shown in FIG. 8 is arranged to subject only the brightnesssignal to the block-distortion reducing process, also the chroma signalmay be subjected to a similar process.

The block-distortion reducing apparatus 10 having the structure as shownin FIG. 8 may be employed as a block-distortion reducing circuit 107 ofa video CD player as shown in FIG. 9.

Referring to FIG. 9, an RF signal read from a disk 101, such as a videoCD or a CD-ROM, by an optical pickup 102 is supplied to an RF amplifier103. The thus-amplified RF signal is demodulated by an EFM demodulating(8-14 demodulation) circuit 104 so as to be formed into serial datawhich is supplied to, for example, a CD-ROM decoder 105 which is adecoder adapted to a disk recording format.

The CD-ROM decoder 105 converts serial data into, for example, an MPEGbit stream signal so as to transmit the MPEG bit stream signal to anMPEG decoder 106. The MPEG is a method using the correlation of time andspatial direction of an image to perform compression and encoding, asdescribed above. To use the correlation in the spatial direction, theblock DCT code is employed. The MPEG decoder 106 performs decoding inaccordance with the format, for example, MPEG 1. When the decodingprocess is performed, an inverse-DCT circuit 162 inverse-DCT data afteran inverse-quantizer 161 has inversely quantized data. If necessary,processes including interpolation are performed, and an output isproduced.

An image signal transmitted from the MPEG decoder 106 is supplied to ablock-distortion reducing circuit 107 which is a noise reducer. Sincethe signal contains noise occurring when the compression/expansion havebeen performed in accordance with MPEG, the block-distortion reducingcircuit 107 eliminates noise. As the block-distortion reducing circuit107, a structure according to the present invention as shown in FIG. 9is applied.

After the process has been performed by the block-distortion reducingcircuit 107, a synchronizing signal is added by an NTSC encoder 108.Moreover, the chroma signal is modulated. Thus, an NTSC image signal isgenerated. The NTSC image signal is transmitted to an output terminal110 through a D/A converter 109.

In relation to the block-distortion reducing circuit 107, a controlcircuit 111 comprising a microcomputer is provided. A control signal issupplied to the control circuit 111 from an operation portion 112. Theoperation portion 112 is provided with a control switch for reducingnoise, for example, reducing block distortion. Thus, the blockdistortion reduction is ON/OFF. The control circuit 111 is usually usedto control another circuit of the block-distortion reducing circuit 107,for example, the MPEG decoder 106.

An algorithm for block-distortion reducing process which is performed bythe block-distortion reducing apparatus 10 having the structure as shownin FIG. 8 will now be described.

FIG. 10 is a flow chart for describing the algorithm of ablock-distortion reducing method according to the embodiment of thepresent invention. In the example shown in FIG. 10, an algorithm of aprocess in a H (horizontal) direction is described. As for an algorithmfor reducing block distortion in a V (vertical) direction is similar tothe foregoing algorithm except for the process in the horizontaldirection is being changed to the vertical direction, it is omitted fromdescription.

Referring to FIG. 10, in step ST41 whether or not the block-distortionreducing process for all of block boundaries in the horizontal directionhave been completed is determined. If an affirmative determination ismade, the process is completed. If a negative determination is made, theprocess proceeds to next step ST42.

The pixels for use in the block-distortion reducing process are similarto those described in the first embodiment shown in FIG. 7. In the firststep ST41 shown in FIG. 10, whether or not the block-distortion reducingprocess for all of the correction process blocks 53 have been completedis determined.

In step ST42 boundary difference |tmp0|, activity |tmp| and adjacentdifference |diff| which are parameters required to determine whether ornot block distortion has taken place are obtained in accordance withequations similar to those employed in the first embodiment.

In step ST43 edge extraction in the edge extraction block 52corresponding to the correction process block is performed so that astraight component (ρ0, θ0) is obtained. The edge extracting processwill be described later.

Then, the operation proceeds to step ST44 so that the degrees of motionvector of two DCT blocks 51L and 51R across the correction process blockare examined. The motion vector detecting operation will be describedlater.

In step ST45 a the parameter, the straight component (ρ0, θ0) and thedegree of the motion vector obtained in the corresponding steps ST42,ST43 and ST44 are used to determine whether or not block distortionexists in the block boundary. Moreover, a process for determining theintensity of the correction is performed. An example of theblock-distortion reducing process will be described later.

If a determination is made in next step ST45 b that block distortiontakes place, the operation proceeds to step ST46 a. If a determinationis made that no block distortion takes place, the operation proceeds tostep ST48.

If a determination is made that block distortion takes place, theoperation proceeds to step ST46 a so that boundary step |step| after thecorrection is obtained in accordance with the characteristics of theimage, in particular, the linearity of the same from the followingequation similarly to the first embodiment:

|step|=|diff3+diff4|/2

Then, a correction amount |σ| required to realize the foregoing blockstep |step| after the correction is obtained from the followingequation:

 |σ|=(|tmp0|−|step|)/2.

It is preferable that the above-mentioned boundary difference |tmp0| isdetermined with the parameter threshold value corr_th so as to switchthe intensity of the correction. In the foregoing case, when|tmp0|<corr_th is satisfied and the intensity of the correction is high(intense correction), the correction amount |σ| is made to be asfollows:

|σ|=(|tmp0|−|step|)/2

When |tmp0|≧ corr_th is satisfied and the intensity of the correction islow (weak correction), the correction amount |σ| is halved as follows:

|σ|=(|tmp0|−|step|)/4

In step ST46 b, in accordance with the obtained correction amount |σ|, acorrection value for each pixel is obtained. To smooth the seam with anadjacent correction range, and since the block distortion becomesintense in the portion adjacent to the boundary, a correction value ininverse proportion to the distance from the boundary is obtained inaccordance with the following equation, similarly to the firstembodiment.

Specifically, when correction value are |σ_(b)| to |σ_(i)| for pixels bto i in the correction range 53 shown in FIG. 6, the foregoingcorrection value |σ| is used to obtain the following correction values:

|σ_(e)|=|σ|, |σ_(f)|=|σ|

|σ_(d)|=|σ|/2, |σ_(g)=|σ|/2

|σ_(c)|=|σ|/4, |σ_(h)=|σ|/4

|σ_(b)|=|σ|/8, |σ_(i)=|σ|/8

In next step ST46 c, the correction values |σ_(b)| to |σ_(i)| for thepixels b to i obtained in step ST46 b are used to obtain image signals(image data) SB_(b) to SB_(i) which have been subjected to the blockdistortion correction.

Specifically, when input image data for the pixels b to i before thecorrection are S_(b) to S_(i), the block-distortion correction circuit 7performs correction of image data supplied from the MPEG decoder 2 suchthat corrected image data SB_(b) to SB_(i) are made as follows tocorrespond to the sign of tmp0:

tmp0≧0: SB_(b)=S_(b)+|σ_(b)|, tmp0<0: SB_(b)=S_(b)−|σ_(b)|

tmp0≧0: SB_(c)=S_(c)+|σ_(c)|, tmp0<0: SB_(c)=S_(c)−|σ_(c)|

tmp0≧0: SB_(d)=S_(d)+|σ_(d)|, tmp0<0: SB_(d)=S_(d)−|σ_(d)|

 tmp0≧0: SB_(e)=S_(e)+|σ_(e)|, tmp0<0: SB_(e)=S_(e)−|σ_(e)|

tmp0≧0: SB_(f)=S_(f)−|σ_(f)|, tmp0<0: SB_(f)=S_(f)+|σ_(f)|

tmp0≧0: SB_(g)=S_(g)−|σ_(g)|, tmp0<0: SB_(g)=S_(g)+|σ_(g)|

tmp0≧0: SB_(h)=S_(h)−|σ_(h)|, tmp0<0: SB_(h)=S_(h)+|σ_(h)|

tmp0≧0: SB_(i)=S_(i)−|σ_(i)|, tmp0<0: SB_(i)=S_(i)+|σ_(i)|

In next step ST47 a signal indicating a result of the block-distortionreducing process is transmitted.

If a determination is made in step ST45 b that no block distortion takesplace, the operation proceeds to step ST48 so that an original signal inthe correction range is as it is transmitted.

An example of the edge detecting process in step ST43 will now bedescribed with reference to FIG. 11.

In first step ST61 shown in FIG. 11, edge elements are extracted bycausing an input signal in the edge extraction block to pass through a2D HPF (High-Pass Filter), for example, the Laplacian filter.

As the 2D Laplacian filter, for example, the coefficients shown in FIG.12 may be employed. The present invention is not limited to those shownin FIG. 12. A variety of modifications may be employed, for example,Sobel operator, Prewitt operator, Kirsch operator and Robinson Operator.

Then, the operation proceeds to step ST62 so that maximum value Max ofthe signals in the block subjected to the HPF is detected. In next stepST63 a threshold value Thresh (for example, Thresh=Max/2) on the basisof the maximum value Max is used to perform binary coding so that edgeelements are extracted. That is, the binary coding is a process which isperformed such that when the input signal Sin>Thresh, output is Sout=1.When Sin≦Thresh, Sout=0.

Then, the operation proceeds to step ST64 so that the extracted edgeelements are Huffinan transformed so as to be mapped to parameter space(ρ, θ). The Huffinan transformation is performed such that edge elements(x, y) in the block are mapped to the parameter space (ρ, θ) inaccordance with the following equation:

x cos θ+y sin θ=ρ

In next step ST65 (ρ0, θ0) to which a multiplicity of points arecollected in the parameter space is detected. A straight line which passthrough (ρ0, θ0) is a straight edge detected in the edge extractionblock. In step ST66 an output of the parameter (ρ, θ) is produced.

An example of the operation for detecting motion in step ST44 shown inFIG. 10 will now be described with reference to FIG. 13.

The motion detecting process shown in FIG. 13 is performed such that theleft and right DCT blocks 51L and 51R across the block boundary in thecorrection processing block shown in FIG. 7 are subjected to patternmatching.

The pattern matching process is performed such that pixels at the samepositions as those of all of pixels in the DCT block and included in aprevious field are read from the memory (step ST72). Then, a processexpressed by a calculation equation (1) is performed (step ST73). Then,pixels in the present field are written on the memory (step ST74):$\begin{matrix}{{Cr} = {\sum\limits_{i = 0}^{j < {{BLK} - H}}\quad {\sum\limits_{j = 0}^{j < {{BLK} - V}}\quad {{{S_{n}( {i,j} )} - {S_{n - 1}( {i,j} )}}}}}} & (1)\end{matrix}$

In equation (1), Sn (i,j) indicates brightness signals of the pixels atthe positions (i,j) in n field and BLK_H and BLK_V indicate sizes of DCTblocks in the horizontal and vertical directions, respectively.

Whether or not the processes in steps ST72 to ST74 have been completedfor all of the pixels in DCT (M X N) blocks is determined in the firststep ST71. When an affirmative determination is made (when the processeshave been completed), the operation proceeds to step ST75 so that themotion determination is performed in accordance with the value of Crobtained in accordance with equation (1).

The motion determination in step ST75 may be performed such thatparameter threshold values mov_thL and mov_thH (where mov_thL<mov_thH)are set for the value of Cr and determination is performed as follows:

If Cr<mov_thL, then motion is small.

If mov_thL≦Cr<mov_thH, then motion is intermediate.

If mov_thH≦Cr, then motion is large.

Although the example shown in FIG. 13 is structured such that patternmatching is performed for all of pixels in the DCT block, the presentinvention is not limited to the foregoing example. For example, amodification may be employed in which an LPF is used to thin two or fourpixels. Then, the thinned pixels are subjected to pattern matching.

Although the example shown in FIG. 13 is structured such that patternmatching for DCT blocks at the same position is performed as the meansfor obtaining the degree of the motion, the present invention is notlimited to the foregoing example. For example, a modification may beemployed in which pattern matching C (k) of all of trial vectors in themotion compensation range are subjected to comparisons. Thus, a trialvector which give a minimum C (k) is made to be the motion vector so asto detect whether or not motion exist. Another modification may beemployed in which a typical point matching is performed.

An example of the block-distortion determining operation in steps ST45 aand ST46 b shown in FIG. 10 will now be described with reference to FIG.14.

In the example shown in FIG. 14, the parameter determination and thedetermination on the basis of the motion detection are combined witheach other.

The above-mentioned pattern matching process for the left and right DCTblocks 51L and 51R across the block boundary of the correctionprocessing block shown in FIG. 7 is performed to examine the degree ofmotion. In step ST81 whether or not the detected motion is small isdetermined. If a determination is made that motions in both of the DCTblocks 51L and 51R are small, a determination is made that noquantization error exist. The operation proceeds to step ST86 so that noblock distortion correction is not performed and the process iscompleted.

If a negative determination is made in step ST81 that the motion is notsmall, the operation proceeds to step ST82 so that whether or not astraight line edge exists on the block boundary is determined. At thistime ρ0=edge extract block size/2 and θ0=π/2. If a determination is madein step ST82 that the straight line edge exists on the boundary, adetermination is made that intense block distortion exists. Then, theoperation proceeds to step ST88 so that the block distortion (intense)is corrected.

If a negative determination is made in step ST82, the operation proceedsto step ST83 so that a determination is made whether or not a straightline edge passes through an adjacent region (area) at the boundarybetween the right and left DCT blocks 51R and 51L shown in FIG. 6. Ifthe straight line edge passes the area, a determination is made thatweak block distortion exist. Thus, the operation proceeds to step ST87so that the block distortion (weak) is corrected.

If a negative determination is made in step ST83, the block distortionis determined by using the parameter so as to determine whethercorrection is intense (step ST84) or correction is weak (step ST85). Ifa determination is made that the correction is intense, the operationproceeds to step ST88. If a determination is made that the correction isweak, the operation proceeds to step ST87. In the other cases,correction is not performed, and then the operation proceeds to stepST86.

An example of the determination of the block distortion will now bedescribed. In accordance with the foregoing parameters |tmp0|, |tmp| and|diff|, the following conditional determination is performed so as todetermine whether or not block distortion exists. The determinationconditions include three conditions below:

(1) Whether or not a stepped portion is excessive as compared with thesurrounding portions.

: boundary difference |tmp0|>activity |tmp|

(2) Whether or not the stepped portion is caused from a quantizationerror of a DC components and low-frequency components, that is, whetheror not the stepped portion is caused from block distortion.

: boundary difference |tmp0|<threshold value div_th

where the threshold value div_th is a fixed value in the secondembodiment. However, a value proportional to a maximum value of thequantization step size of each block may be employed.

(3) Whether or not stepped portions larger than a stepped portion at theboundary exist on the two sides of the boundary, that is, whether or notedges exist on the two sides of the boundary.

: adjacent difference |diff3|≦boundary difference |tmp0|

moreover, adjacent difference |diff4|<boundary difference |tmp0|.

When all of the three determination conditions are satisfied, adetermination is made that block distortion exists. The intensity of thecorrection is determined in accordance with whether or not the boundarydifference |tmp0| is smaller than the parameter threshold value corr_thas follows:

If |tmp0|<corr_th, then intense correction is performed.

If |tmp0|≧corr_th, then weak correction is performed.

where corr_th<div_th.

It is preferable that values of the threshold value div_th and corr_thare adaptively changed in accordance with the degree of the motionobtained in the above-mentioned motion detecting process. For example,the following relationships may be employed:

If motion is large, then div_th=div_th (constant)

corr_th=corr_th (constant)

If motion is intermediate, then div_th=div_th/2

corr_th=corr_th/2

Note that the degrees of the motion in the motion detecting process arenot limited to the three steps consisting of large, intermediate andsmall. Also the threshold values div_th and corr_th are not limited tothe two steps consisting of large and intermediate. A finer steps mayblock employed.

As the method of the edge extracting process described with reference toFIG. 11, the following simple method may be employed in place of theHuffman transformation.

A flow chart for describing the simple operation for extracting edges isshown in FIG. 15. FIG. 16 is a block diagram showing the schematicstructure of a block-distortion reducing apparatus for use in theforegoing edge extracting process.

In the foregoing structure, edge extraction is performed by onedimensional (horizontal directional) secondary differentiation (BPF:Band Pass Filter) in step ST91 shown in FIG. 15. Transmission function H(z) of the secondary differentiation characteristic is exemplified by:

H (z)=(−1+2z ⁻¹ −z ⁻²)/4

The absolute value of the secondary differential signal is calculated.Then, in step ST92 a maximum value in the processing block is detected.The maximum value is used in next step ST93 such that a BPF-processedimage is binary-coded so that edges are detected. The threshold valuefor use in the binary-coding process may be, for example, ½ of a maximumvalue obtained by the secondary differentiation and the absolute-valueprocess in the block.

An edge extracting portion 17′ shown in FIG. 16 secondary-differentiatesthe supplied brightness signal from the terminal 12 by a BPF 34′ asdescribed above. Then, an absolute-value calculating circuit 38calculates the absolute value, and a maximum value detecting circuit 35decodes the maximum value. The threshold value communicated from themaximum value detecting circuit 35 is communicated to a binary-codingcircuit 36 so that the signal supplied from the absolute-valuecalculating circuit 38 is binary-coded. An output of the binary-codingcircuit 36 is supplied to a vertical correlation detecting portion 39.

The other structures and operations shown in FIG. 16 are similar tothose of the structure shown in FIG. 8. The similar portions are giventhe same reference numerals and the similar portions are omitted fromillustration. The vertical correlation detecting portion 39 performs asimilar operation to that performed by the vertical correlationdetecting circuit 5 according to the first embodiment shown in FIG. 1.

Although this structure is arranged such that the classes and thecorrection steps are made to be four classes and three stepsrespectively, the present invention is not limited to the foregoingstructure. The weighting factor Kc of the amount of correction which iscalculated by detecting the vertical correlation may be obtained from,for example, the following equation:

Kc=Eb/(Ea+Eb+Ec)

Moreover, the class obtained by the vertical correlation detectingportion 39 may be used to control the value of div_th which is thethreshold value for use in the detection which is performed by theblock-distortion determining portion. Since there is a great possibilitywhen the vertical correlation is low, the threshold value div_th isenlarged so that control is performed in a direction in which detectioncannot easily be performed.

In the present invention, the edge extracting portion, thecorrection-signal calculating portion and theblock-distortion-determining-parameter calculating portion are arrangedto be performed in accordance with the above-mentioned algorithms.However, the present invention is not limited to the foregoingalgorithms. A variety of modifications may be employed, for example, anLPF may be employed as the correction-signal calculating portion. Avariety of edge extracting methods, for example, an edge extractingmethod arranged to trace edges, may be employed. A variety of parametersmay be employed in the block-distortion determining portion.

The foregoing embodiment has the structure that the block distortioncorrection is performed in the horizontal direction of the brightnesssignal. The present invention is not limited to the foregoing method. Avariety of modifications may be employed, for example, theblock-distortion correction is performed in the vertical direction orthe chroma signal is corrected.

An example of a process will now be described, in which thedetermination which is performed by the block-distortion determiningcircuit 6 whether or not block distortion exists, is performed such thatdetermining conditions are adaptively added to determine the blockdistortion as well as the determining conditions employed in the firstand second embodiments. In the following description, the operationwhich is performed by the block-distortion determining circuit 6according to the first embodiment will now be described.

A process which is performed by the block-distortion determining circuit6 when information has been supplied from the parameter calculatingcircuit 4, the information indicating a fact that all of diff0 to diff7have negative values and only tmp0 has a positive value or all of diff0to diff7 have positive values and only tmp0 has a negative value. Notethat FIG. 17 has the axis of ordinate which stands for levels ofbrightness signals of pixels a to j arranged in a line in a directionperpendicular to the block boundary. White circles indicate values ofthe brightness signals before the correction, while black circlesindicate values of the brightness signals after the correction.

When the pixels a to e are monotonously decreased and the brightness israised at only the block boundary and the brightness of each of thepixels f to j is monotonously decreased, a determination is made thatmonotonous decrease takes place also at the block boundary before thecoding or decoding process. Then, the correction is performed.

That is, when a parameter indicating the foregoing image data has beensupplied from the parameter calculating circuit 4 to theblock-distortion determining circuit 6, first to third determiningconditions below are added to the determining conditions according tothe first and second embodiments:

diff0 to diff7>0 or diff0 to diff7<0  (1)

tmp0×(diff0) to diff7)<0  (2)

Kp≧diff_th  (3)

Thus, the block distortion is determined. That is, in accordance withthe first determining condition, whether change in the brightness in thecorrection range except for the brightness is monotonous decrease ormonotonous increase is determined. In accordance with the seconddetermination condition, a determination is made that change in thebrightness at the block boundary is inverse to change in anotherbrightness in the correction range. In accordance with the thirddetermination condition, a determination is made that the parameter Kpindicating the encoding degree of difficulty is not smaller than theparameter threshold value diff_th.

When the foregoing first to third determination conditions aresatisfied, the block-distortion determining circuit 6 produces a flagindicating that image data before encoding or decoding is performed isimage data which is monotonously decreased or monotonously increased soas to communicate the flag to the block-distortion correction circuit 7.

In accordance with the flag communicated from the block-distortiondetermining circuit 6, the block-distortion correction circuit 7calculates correction value σ0 as follows. The intensity of thecorrection is determined by the block-distortion correction circuit 7 inaccordance with whether or not the block difference |tmp0| is smallerthan the parameter threshold value corr_th.

When the block boundary difference |tmp0|<corr_th, correction valueσ0=(|tmp0|+|step|)/2 so that the correction is intensified.

When |tmp0|≧corr_th, correction value σ0=(|tmp0|+|step|)/4 so that thecorrection is weakened.

When |diff3| has a value larger than that of |tmp0| at the blockboundary as shown in FIG. 18, the determination conditions employed inthe first and second embodiments does not satisfy the condition underwhich block distortion can be detected. Therefore, if block distortionis visually recognized and the block distortion cannot be recognized,the block-distortion determining circuit 6 adds the first to thirddetermination conditions to the determination conditions employed in thefirst and second embodiments:

 block boundary difference |tmp0|≧activity |tmp|  (1)

block boundary difference |tmp0|<det_th  (2)

diff3×tmp0<0, diff4×tmp0 ≧0, diff2×diff3 ≧0  (3)

Thus, the block-distortion determining circuit 6 determines the blockdistortion. That is, the first determination condition is used todetermine whether or not a stepped portion projecting to the blockboundary exists. The second determination condition is used to determinewhether or not an edge exists at the block boundary. The thirddetermination condition is used to determine whether or not the pixeladjacent to the block boundary has an edge. That is, the thirddetermination condition is used to determine a fact that the change inthe brightness between pixels d and e and the change in the brightnessat the block boundary are opposite to each other. Moreover, a fact isdetermined that the change in the brightness between pixels f to g andthe change in the brightness at the block boundary are the same.Moreover, a fact is determined that the change in the brightness betweenpixels c and d and the change in the brightness between pixels d and eare the same. Inversely to the process shown in FIG. 18, the thirddetermination condition is used to determine whether or not an edgeexists between pixels f and g as follows:

diff4×tmp0<0, diff3×tmp0≧0, diff4×diff5≧0

When the flag has been communicated to the block-distortion correctioncircuit 7 in accordance with the above-mentioned determinationcondition, the block-distortion correction circuit 7 determines theintensity of the coefficient in accordance with whether or not theboundary difference |tmp0| is smaller than the parameter threshold valuecorr_th.

When block boundary difference |tmp0|≧corr_th, correction valueσ0=(|tmp0|+|diff3|)/4 so that the correction is weakened.

When |tmp0|<corr_th, correction value σ0=(|tmp0|+|diff3|)/2 so that thecorrection is intensified.

Correction values σ1 and σ2 are made to be as follows:

correction value σ1=diff2/2

correction value σ2=diff4/2

Inversely to the process shown in FIG. 18, if an edge exists betweenpixels f and g, when block boundary difference |tmp0|≧corr_th, thecorrection value σ0=(|tmp0|+|diff4|)/4 so that the correction isweakened.

When |tmp0|<corr_th, correction value σ0=(|tmp0|+|diff4|)/2 so that thecorrection is intensified.

Correction values σ1 and σ2 are made to be as follows:

correction value σ1=diff3/2

correction value σ2=diff5/2

The block-distortion determining circuit 6 changes the determinationconditions as described above. Thus, even if recognition is made that anedge exists on a pixel adjacent to the block boundary, block distortioncan be detected.

Even if a pixel indicating an edge which can be detected as blockdistortion exists in parallel to the block boundary as shown in FIG. 19,the vertical correlation detecting circuit 5 may be controlled such thatthe vertical correlation detecting circuit 5 does not perform correctionwhen the edge is larger than the threshold value. Note that thestructure shown in FIG. 19 is arranged such that a pixel which can berecognized by the vertical correlation detecting circuit 5 is expressedas 1. On the other hand, a pixel which cannot be recognized as an edgeis expressed as 0. That is, as shown in FIG. 19, line A which is beingsubject to the block distortion correction and the position of an edgeof a line adjacent to the line A in the vertical direction V aredetected in the vertical correlation detection range. Then, portions inwhich edges exist at the same positions on three lines in the verticaldirection are counted. At this time, the number of pixels which aredetected as edges is made to be num_edge and a threshold value for useto determine whether or not the correction is performed is edge_th.Then, the block-distortion determining circuit 6 produces a flagindicating a fact that no correction is performed when the followingcondition is satisfied:

num_edge>edge_th.

Then, the block-distortion determining circuit 6 produces an output ofthe flag to the block-distortion correction circuit 7. As describedabove, the vertical correlation detecting circuit 5 detects thecorrelation in the vertical direction. Then, the block-distortiondetermining circuit 6 changes the determination condition. Thus,incorrect detection can be reduced in which a picture having a finestripe pattern existing in the vertical direction is incorrectlydetected as block distortion.

To reduce forming of a new edge as a result of the correction of theblock distortion by the process according to the first and secondembodiments, the block-distortion determining circuit 6 corrects theblock distortion as shown in FIG. 20 such that the first to thirddetermination conditions below are added so as to determine the blockdistortion:

|step|<σ0×corr_ratio  (1)

σ0>|diff3| and σ0>|diff4|  (2)

|tmp0|<corr_th  (3)

That is, the first determination condition is used to determine whetheror not the step |step| after the correction is smaller than a parameterratio (corr_ratio) as compared with the correction amount σ0. The seconddetermination condition is used to determine whether or not thecorrection amount σ0 is larger than the steps (diff3 and diff4) on thetwo sides of the block boundary. The third determination condition isused to determine whether or not the step |step| at the block boundaryis smaller than the threshold value corr_th for determining thecorrection amount. Note that the third determination condition isarranged such that the ratio of the step |step| after the correction andthe correction amount satisfies 0<corr_ratio<1.

When the first to third determination conditions are satisfied, theblock-distortion determining circuit 6 produces an output of a flagindicating the foregoing fact to the block-distortion correction circuit7. The block-distortion correction circuit 7 makes correction value σ0′of pixels e and f as follows:

σ0′=σ0/2

Thus, the correction value σ0 calculated in the process employed in thefirst and second embodiment is corrected.

Moreover, correction values σ1, σ2 and σ3 of pixels around the pixels eand f are made to be as follows:

σ1=σ0′/2

σ2=σ0′/4

σ3=σ0′/8

Since the correction values are determined as described above, thecorrected brightness is free from a stepped portion which is indicatedwith a black circle shown in FIG. 20 and which is newly recognized asblock distortion.

As described above, the block-distortion determining circuit 6 adds thefirst to third determination conditions so as to identify the pattern ofthe brightness adjacent to the block boundary. Then, whether or not anew edge is generated if the correction is performed under thedetermination conditions employed in the first and second embodiments ispredicted. Thus, the block-distortion determining circuit 6 is able tocontrol the correction value. Therefore, addition of the first to thirddetermination conditions as described above enables formation of a newedge after the correction has been performed to be reduced.

The block-distortion determining circuit 6 according to the first andsecond embodiments is able to reduce a fact that enlargement of diff3after the correction causes a new edge to be detected as a result of theprocess as shown in FIG. 21.

When the block-distortion reducing apparatus 1 structured as describedabove performs the block-distortion reducing process, the operation isperformed in accordance with a flow chart shown in FIG. 22.

In accordance with the flow chart, in step ST101 whether or not all offrames constituting a dynamic image have been processed is determined.If a determination is made that all of the frames have been processed,the operation proceeds to step ST102 so that the process is ended. If adetermination is made that the process has not been completed, theoperation proceeds to step ST103.

In step ST103 whether or not the frame which must be subjected to theblock-distortion reducing process is I-picture is determined. If adetermination is made that the frame is the I-picture, the operationproceeds to step ST104. If a determination is made that the frame is notthe I-picture, the operation proceeds to step ST105.

In step ST104 the encoding-degree-of-difficulty evaluation circuit 3calculates, from the MPEG decoder 2, the parameter Kp indicating theencoding degree of difficulty by using the IDCT coefficient. In stepST105 the IDCT coefficient and the motion vector difference MV are usedto calculate the parameter Kp indicating the encoding degree ofdifficulty. The parameter Kp is transmitted to the block-distortiondetermining circuit 6 and the block-distortion correction circuit 7.Then, the operation proceeds to step ST106.

In step ST106 whether or not all of DCT blocks in the frame which mustbe processed have been processed is determined. If a determination ismade that the process has been completed, the operation returns to stepST101 so that a next frame is processed. If a determination is made thatthe process has not been completed, the operation proceeds to stepST107.

In step ST107 the parameter calculating circuit 4 calculates parametersincluding activity |tmp| adjacent to the block boundary, block boundarydifference |tmp0| and adjacent differences |diff0| to |diff7| so as totransmit the parameters to the block-distortion determining circuit 6.Then, the operation proceeds to step ST108.

In step ST108 the vertical correlation detecting circuit 5 extractsedges so that weighting factor Kc is calculated. The weighting factor Kcis transmitted to the block-distortion determining circuit 6 and theblock-distortion correction circuit 7. Then, the operation proceeds tostep ST109.

In step ST109 the block-distortion determining circuit 6 uses verticalcorrelation value Kc supplied from the vertical correlation detectingcircuit 5 and the parameter Kp indicating the encoding degree ofdifficulty and supplied from the encoding-degree-of-difficultyevaluation circuit 3 so as to determine threshold value det_th andcorr_th.

In step ST110 the block-distortion determining circuit 6 employs thefollowing determination conditions:

|tmp0|>|tmp| and |tmp0|<det_th

Thus, the block-distortion determining circuit 6 determines whether ornot the stepped portion at the block boundary is an excessivelyprojecting stepped portion as compared with adjacent pixels and whetheror not the stepped portion is caused from a quantization error of DCcomponents and low-frequency components, that is, whether or not thestepped portion is caused from block distortion. If the twodetermination conditions are not satisfied, the operation proceeds tostep ST111 so that the block-distortion correction circuit 7 does notperform the correction operation. Thus, the original signal is as it istransmitted. If either of the two determination conditions is satisfied,a determination is made that block distortion exists. Thus, theoperation proceeds to step ST112.

In step ST112 the block-distortion determining circuit 6 determineswhether or not image which must be processed satisfies the followingdetermination conditions as described with reference to FIG. 17:

diff0 to diff7>0 or diff0 to diff7<0  (1)

tmp0×(diff0 to diff7)<0  (2)

Kp≧diff_th  (3)

If the foregoing determination conditions are satisfied, a determinationis made that change in the brightness in the correction range except forthe block boundary is monotonous decrease or monotonous increase. Thus,the operation proceeds to step ST115. If the foregoing determinationconditions are not satisfied, the operation proceeds to step ST113.

In step ST115 when a flag indicating a result of the determination madein step ST112 has been communicated to the block-distortion correctioncircuit 7, the block-distortion correction circuit 7 determines whetheror not |tmp0|>corr_th is satisfied. If the foregoing condition issatisfied, the operation proceeds to step ST116 so that the correctionis made to be weak. If the foregoing condition is not satisfied, theoperation proceeds to step ST117 so that the correction is intensified.Then, the operation proceeds to step ST122.

In step ST113 the block-distortion determining circuit 6 determineswhether or not the determination conditions |tmp0|≧|diff3| and|tmp0|≧|diff4| are satisfied. Thus, the determination conditions whenblock distortion cannot be recognized under the conditions employed inthe first and second embodiments are changed. If the foregoingconditions are satisfied, a determination is made that no edge existsexcept for the block boundary. Thus, the operation proceeds to stepST114. If the conditions are not satisfied, a determination is made thatan edge exists in a portion except for the block boundary. Thus, theoperation proceeds to step ST118 so that a special process to bedescribed later is performed.

In step ST114 the block-distortion determining circuit 6 performs aprocess similar to the process which is performed in step ST115. If thecondition is satisfied, the operation proceeds to step ST120. If thecondition is not satisfied, the operation proceeds to step ST119.

In step ST119 the block-distortion determining circuit 6 performs theprocess described with reference to FIG. 20. That is, in step ST119 thefirst and second determination conditions are determined. Note that thethird determination condition has been satisfied in step ST114. Sincethe above-mentioned determination conditions are employed, whether ornot a new edge has been formed adjacent to the block boundary after thecorrection has been performed is determined. In step ST119, if the firstand second determination conditions are satisfied, a determination ismade that a new edge is formed after the correction is performed. Thus,the operation proceeds to step ST120 so that the correction is weakened.If the conditions are not satisfied, a determination is made that anynew edge is formed after the correction has been performed. Thus, theoperation proceeds to step ST121 so that the correction is intensified.

In step ST120 and step ST121 the block-distortion correction circuit 7determines the intensity of the correction similarly to step ST116 andstep ST117. Then, the operation proceeds to step ST122.

In step ST122 the block-distortion correction circuit 7 multiplies thecorrection value σ0 with the parameter Kp supplied from theencoding-degree-of-difficulty evaluation circuit 3 and indicating theencoding degree of difficulty and the weighting factor Kc supplied fromthe vertical correlation detecting circuit 5 and indicating thecorrelation. Then, the operation proceeds to step ST123.

In step ST123 the block-distortion correction circuit 7 determines acorrection value for each pixel in the correction range. At this time,the block-distortion correction circuit 7 intensifies the correction inthe vicinity of the block boundary. When correction values σ1, σ2 and σ3for the pixels have been determined, the operation proceeds to stepST124.

In step ST124 the block-distortion correction circuit 7 adds thecorrection value determined in step ST123 to the original signal so thatcorrected image data is obtained. In step ST125 the block-distortioncorrection circuit 7 produces an output of image data, from which theblock distortion has been reduced. In step ST126 the block-distortionreducing process and the correction process for one DCT block arecompleted. Then, the process is returned to step ST106. That is,according to the flow chart, each DCT block forming one frame issubjected to the processes in steps ST106 to ST125. Thus, the noiseeliminating process and the correction process are performed. When allDCT blocks in one frame have been processed in step ST106, a next frameis processed. Since steps ST101 to ST106 are repeated, all of frameforming a dynamic image are processed.

The special process in step ST118 will now be described with referenceto a flow chart shown in FIG. 23.

In accordance with the flow chart, in step ST131 the verticalcorrelation detecting circuit 5 counts the number of edges, that is,num_edge, in the vertical direction V as described with reference toFIG. 19. The block-distortion determining circuit 6 determines whetheror not the determination condition num_edge>edge_th is satisfied. If theforegoing condition is satisfied, the operation proceeds to step ST132so that the noise eliminating process is not performed and the originalsignal is as it is transmitted. That is, a determination is made thatthe original signal is image data indicating a stripe pattern adjacentto the block boundary. If the condition is not satisfied, the operationproceeds to step ST133.

In step ST133 the block-distortion determining circuit 6 determineswhether or not an edge existing in a portion except for the blockboundary exists on the left side of the block boundary. That is, in stepST133 the block-distortion determining circuit 6 determines whether ornot the following conditions is satisfied:

diff3×tmp0<0, diff4×tmp0≧0, diff2×difF3≧0

If the foregoing determination condition is satisfied, the operationproceeds to step ST134. If the condition is not satisfied, the operationproceeds to step ST139.

In step ST139 the block-distortion determining circuit 6 determines anedge existing in a portion except for the block boundary exists on theright side of the block boundary. That is, in step ST133 theblock-distortion determining circuit 6 determines whether or not thefollowing condition is satisfied:

diff4×tmp0<0, diff3×tmp0≧0, diff4×diff5≧0

If the foregoing condition is satisfied, the operation proceeds to stepST140. If the condition is not satisfied, a determination is made thatno portion, which is determined as an edge, exists on the two sides ofthe block boundary. Thus, the operation proceeds to step ST132 so thatthe original signal is as it is transmitted.

In step ST134 the block-distortion correction circuit 7 determineswhether or not |tmp0|>corr_th. If the foregoing condition is satisfied,the operation proceeds to step ST135 so that the correction is weakened.If the condition is not satisfied, the operation proceeds to step ST136so that the correction is intensified. Then, the operation proceeds tostep ST137 in either case.

In step ST137 the block-distortion correction circuit 7 multiplies thecorrection value σ0 with the parameter Kp supplied from theencoding-degree-of-difficulty evaluation circuit 3 and indicating theencoding degree of difficulty and the weighting factor Kc supplied fromthe vertical correlation detecting circuit 5 and indicating thecorrelation. Then, the operation proceeds to step ST138.

In step ST138 correction values σ1 and σ2 for the pixels adjacent to thetwo sides of the pixel which is corrected with the correction value σ0are calculated in accordance with the following equation:

σ1=diff2/2, σ2=diff4/2

In steps ST140 to ST146 processes similar to those in steps ST134 toST138 are performed. The difference lies in that in step ST141 and stepST142 the intensity of the correction is determined. Moreover, in stepST144 the adjacent difference which must be corrected with thecorrection value al is diff3. Moreover, the adjacent difference whichmust be corrected with the correction value σ2 is diff5.

In step ST145 a process similar to that in step ST124 is performed. Instep ST146 a process similar to that in step ST125 is performed. Thus,the process is ended.

Although the operation of the block-distortion reducing apparatusdescribed with reference to FIGS. 17 to 23 has been described about theblock-distortion reducing apparatus 1 according to the first embodiment,the same arrangement may be applied to the block-distortion reducingcircuit according to the second embodiment. In this case, theblock-distortion reducing circuit according to the second embodiment isarranged such that the block-distortion determining portion 18 employsthe above-mentioned determination conditions corresponding to picturesof image data. Thus, block distortion is determined to correspond to thepicture, and then the correction-value calculating portion 32 performscorrection.

A third embodiment of the present invention will now be described. Whena dynamic image compressed by an image compressing apparatus arranged toperform a block process using 2D DCT is again compressed by the MPEG, ablock distortion encoding apparatus according to this embodimentpreviously removes block noise peculiar to the foregoing compressingmethod and then perform the re-compressing operation so as to improvethe encoding and compressing efficiency.

When a bit stream formed by encoding image data read from a recordingmedium, for example, an optical disk, is broadcast, a reading bit ratefrom the recording medium and broadcasting bit rate are generallydifferent from each other. Therefore, the bit rate of the bit stream isconverted. Specifically, an 8 Mbps bit stream is sometimes convertedinto 4 Mbps bit stream.

Hitherto, when the rate of a bit stream encoded by MPEG is convertedafter which re-encoding on the basis of the MPEG is performed,re-encoding has been performed as it is even if block noise is caused inthe decoded image obtained by the MPEG decoding.

When a bit stream on the basis of a dynamic image encoding method forperforming a recording process using DCT except for the MPEG isMPEG-encoded after a decoded image has temporarily been obtained by theforegoing encoding method so as to be converted into the MPEG bitstream, MPEG-encoding has been performed as it is even if block noise ismade.

Therefore, when motion vector detection is performed for motioncompensation when MPEG encoding is performed when MPEG re-encoding isperformed of when the format is converted, the accuracy to detect themotion vector has deteriorated because of obstruction of block noise.

The position at which block noise is made depends on the block of theblock. Therefore, when the same encoding method is employed to performencoding for the purpose of performing re-encoding or format conversion,there arises a problem in that block noise is highlighted and made to beconspicuous on a reproduced image if the image on which block noise hasbeen made is encoded without elimination of block noise.

FIG. 24 is a block diagram showing an encoding apparatus according to athird embodiment and arranged to perform elimination of block noisebefore re-encoding is performed.

The encoding apparatus according to this embodiment incorporates, aninput terminal 51; an adaptive block-noise eliminating circuit 56 forsubjecting a supplied bit stream to adaptive block noise elimination;and an encoder 54 for encoding a decoded image transmitted from theadaptive block-noise eliminating circuit 56 into a bit stream in theform of the MPEG standard so as to produce an output of the decodedimage to an output terminal 55.

The adaptive block-noise eliminating circuit 56 incorporates an edgeextraction block 52 for decoding a supplied bit stream; and ablock-noise eliminating circuit 53 for eliminating block noise from thedecoded image.

The bit stream supplied through the input terminal 51 is decoded by theedge extraction block 52. The bit stream supplied through the inputterminal 51 has been encoded by an encoding method for performing ablock process using the two-dimensional DCT. Therefore, the foregoingbit stream can be decoded by the edge extraction block 52.

Block noise of the image decoded by the edge extraction block 52 iseliminated by the block-noise eliminating circuit 53. Elimination ofblock noise by the block-noise eliminating circuit 53 may be performedby, for example, the above-mentioned method. Since block noise of theinput image which is supplied to the encoding apparatus has been removedfrom the decoded image which is supplied to the encoder 54, the encodingefficiency of the encoder 54 can be improved.

The encoded bit stream obtained by the encoder 54 is transmitted to theoutput terminal 55.

When the bit stream supplied through the input terminal 51 is a bitstream encoded by a hybrid compression method using motion compensationas well as the two-dimensional DCT like the MPEG using motioncompensation DCT, a motion vector having a high correlation withgeneration of block noise and an encoding parameter, such as the countafter the inverse DCT can be obtained from the input terminal 51.Therefore, use of the adaptive block-noise eliminating circuit 56enables block noise to furthermore efficiently be eliminated. Theadaptive block noise elimination has been described above.

FIG. 25 is a block diagram of the adaptive block-noise eliminatingcircuit 56 for performing the adaptive block noise elimination.

The adaptive block-noise eliminating circuit 56 incorporates a MPEGdecoder 72 for decoding a bit stream supplied through an input terminal71 and encoded by the MPEG method; a YC separating circuit 75 forseparating Y signals and C signals from the decoded image supplied fromthe MPEG decoder 72; a delay circuit 78 for delaying the C signalsupplied from the YC separating circuit 75; a pixel-value memory 76 formemorizing the Y signals supplied from the YC separating circuit 75; anda YC synthesizing circuit 79 for synthesizing the C signal obtainedthrough the delay circuit 78 and the Y signal obtained through thepixel-value memory 76 with each other so as to transmit an output imageto an output terminal 80. The MPEG decoder 72 corresponds to the edgeextraction block 52 shown in FIG. 24.

The adaptive block-noise eliminating circuit 56 incorporates anencoding-degree-of-difficulty calculating circuit 73 for calculating theencoding degree of difficulty in accordance with the encoding parametersupplied from the MPEG decoder 72; a parameter calculating circuit 77for calculating a parameter for the Y signal supplied from thepixel-value memory 76; and a distortion-determining and correction-valuecalculating circuit 74 for determining block distortion in accordancewith the encoding degree of difficulty communicated from theencoding-degree-of-difficulty calculating circuit 73 and the parametersupplied from the parameter calculating circuit 77 and calculating acorrection value so as to supply the distortion correction value to thepixel-value memory 76.

The MPEG-encoded bit stream supplied to the input terminal 71 is decodedby the MPEG decoder 72.

The encoding parameter obtained when the decoding operation has beenperformed is supplied to the encoding-degree-of-difficulty calculatingcircuit 73 so that the encoding degree of difficulty is obtained. Theencoding degree of difficulty is communicated to thedistortion-determining and correction-value calculating circuit 74 so asto be used in the block distortion determination and calculation of thecorrection value.

The YC separating circuit 75 separates the supplied decoded image into Ysignals and C signals. Pixel values in a range required to correct the Ysignal are stored in the pixel-value memory 76.

The parameter calculating circuit 77 calls a required Y signal from thepixel-value memory 76 so as to calculate a parameter. Thedistortion-determining and correction-value calculating circuit 74determines whether or not block distortion takes place in accordancewith the supplied parameter and the encoding degree of difficulty. Ifblock distortion takes place, the distortion-determining andcorrection-value calculating circuit 74 determines the pattern of theblock distortion so as to calculate a correction value so as to supplyit to the pixel-value memory 76. In the pixel-value memory 76, thecorrection value is added to the parameter Y signal so that a correctionsignal is obtained.

In a case shown in FIG. 24, a digital signal is sometimes converted intoan analog signal after the bit stream has been decoded. In the foregoingcase, as shown in FIG. 26, the analog signal is encoded by the encoder54 after block noise has been removed by the block-boundary determiningcircuit 81 and the block-noise eliminating circuit 82.

As described above, the third embodiment has a structure that blocknoise peculiar to the compression method is removed by a block noiseeliminating filter when a dynamic image compressed by an imagecompressing method using the two-dimension DCT is temporarily decoded soas to be returned to an image and then re-compression is performed.

Since block noise is eliminated, the accuracy of the motion predictioncan be improved. Thus, the encoding efficiency when the re-compressionis performed can be improved.

Since block noise is previously removed, block noise of an imageobtained by decoding a re-compressed image can be reduced.

When the pervious compression method is the hybrid compression methodusing the MC-DCT and vector information when MC is performed is usedwhen the re-compression is performed, use of the adaptive block noiseeliminating method using the motion vector information enables theefficiency in the block noise elimination to be improved.

As described above, when an image compressed by the dynamic-imagecompressing and encoding method using the two-dimensional DCT istemporarily decoded and then re-encoded, the encoding efficiency can beimproved. Thus, generation of block noise can be reduced and thus visualimage quality can be improved.

As can be understood from the description above, the method andapparatus for reducing block distortion and the encoding method and theencoding apparatus according to the present invention is able to reducea problem caused from correction while block distortion is reduced in astate in which high-frequency components are not omitted and thus theresolution is maintained. Since the hardware structure can besimplified, the structure according to the present invention can bemounted on a variety of consumer appliances for performing a compressingprocess using block encoding, such as DCT encoding. That is, the presentinvention may be applied to, for example, a video CD player, a digitalvideo disk player, a digital television receiver, and a televisiontelephone and so forth. As a matter of course, the above-mentionedalgorithm can be realized by means of software. Thus, reduction of blockdistortion and elimination of block distortion can easily be realizedwhen a dynamic image is reproduced in a real time manner in, forexample, Internet or multimedia. Since the structure of the presentinvention has three modes including intense/intermediate/weak, reductionof block distortion adaptable to a state of the image can be performed.Also the parameter for use in the block-distortion reducing process canbe adjusted from outside, a precise adjustment is permitted as well asthe three modes.

Moreover, the present invention is arranged to use effective informationabout the edge extraction and motion detection is able to reduce anincorrect determination which is caused from determination of blockdistortion.

Note that the present invention is not limited to the above-mentionedembodiments. Although the description has been made about the horizontal(H) direction, the present invention may be applied to a process in thevertical (V) direction. As a matter of course, the method of calculatingthe correction value and the filtering process are not limited to theabove-mentioned descriptions.

What is claimed is:
 1. A method of reducing block distortion such thatblock distortion caused when supplied image data is block-encoded isreduced, said method of reducing block distortion comprising: anencoding-degree-of-difficulty detecting step for detecting a parameterindicating an encoding degree of difficulty from supplied image data; acalculating step for calculating a parameter required to determine blockdistortion from supplied image data; a determining step for determiningblock distortion in accordance with a result of detection of theparameter indicating the encoding degree of difficulty and a result ofthe calculation for obtaining the parameter; a correction-valuecalculating step for calculating a correction value for reducing blockdistortion; and a step for subjecting supplied image data to acorrection using a correction value corresponding to a result of thedetermination of block distortion so as to produce an output.
 2. Amethod of reducing block distortion according to claim 1, wherein saidencoding-degree-of-difficulty detection step is performed such that aprocess for calculating an amount of energy of high-frequency componentsis performed in such a way that high-frequency components of suppliedimage data are extracted so as to detect the parameter indicating theencoding degree of difficulty.
 3. A method of reducing block distortionaccording to claim 1, wherein said encoding-degree-of-difficultydetection step is performed such that motion detection process isperformed to detect the motion of supplied image data so as to detectthe parameter indicating the encoding degree of difficulty.
 4. A methodof reducing block distortion according to claim 1, wherein saidencoding-degree-of-difficulty detection step is performed such thatmotion detection process is performed to detect the motion of suppliedimage data and a process for calculating an amount of energy ofhigh-frequency components is performed in such a way that high-frequencycomponents of supplied image data are extracted so as to detect theparameter indicating the encoding degree of difficulty.
 5. A method ofreducing block distortion according to claim 1, further comprising adecoding step for subjecting a supplied bit stream to a decoding processfor the purpose of obtaining supplied image data, wherein said decodingstep is performed such that the supplied bit stream is subjected to adecoding process and a motion vector difference signal and an IDCTcoefficient contained in the supplied bit stream are detected, and saidencoding-degree-of-difficulty detection step is performed such that themotion vector difference signal and the IDCT coefficient detected in thedecoding step are converted into the parameter indicating the encodingdegree of difficulty.
 6. A method of reducing block distortion accordingto claim 1, wherein said determining step is performed such that aplurality of intensities of block distortion are determined to causecorrection to be performed with an amount of correction corresponding tothe determined intensity.
 7. A method of reducing block distortionaccording to claim 1, further comprising a correlation detecting stepfor detecting correlation of a boundary among blocks, wherein saiddetermining step is performed such that block distortion is determinedby using the correlation detected in said correlation detecting step,and said correction-value calculating step is performed such that thecorrelation detected in said correlation detecting step is used tocalculate the correction value.
 8. A method of reducing block distortionaccording to claim 2, wherein the extraction of high-frequencycomponents is detection of edge components of supplied image data, andthe process for calculating the energy amount of the high-frequencycomponents is an edge extracting process.
 9. A method of reducing blockdistortion according to claim 2, wherein said correction-valuecalculating step is performed such that the parameter detected in saidencoding-degree-of-difficulty detecting step and on the basis of aresult of the extraction of the high-frequency components performed insaid process for calculating the energy amount of the high-frequencycomponents is used to calculate the correction value.
 10. A method ofreducing block distortion according to claim 3, wherein saidcorrection-value calculating step is performed such that the parameterdetected in said encoding-degree-of-difficulty detecting step and on thebasis of a result of the motion detection performed in said motiondetecting process is used to calculate the correction value.
 11. Amethod of reducing block distortion according to claim 4, wherein saidcorrection-value calculating step is performed such that the parameterdetected in said encoding-degree-of-difficulty detecting step and on thebasis of a result of motion detection performed in said motion detectingprocess and a result of motion detection performed in said process forcalculating the energy amount of the high-frequency component is used tocalculate the correction value.
 12. A method of reducing blockdistortion according to claim 5, wherein said determining step isperformed such that a parameter on the basis of the motion vectordifference signal and the IDCT coefficient detected in said decodingstep is used to determine block distortion, and said correction-valuecalculating step is performed such that a parameter on the basis of thevector signal and the IDCT coefficient detected in said decoding step isused to calculate the correction value.
 13. A method of reducing blockdistortion according to claim 9, wherein the extraction ofhigh-frequency components is detection of edge components of suppliedimage data, and the process for calculating the energy amount of thehigh-frequency components is an edge extracting process.
 14. Ablock-distortion reducing apparatus for reducing block distortion causedwhen image data is block-encoded, said block-distortion reducingapparatus comprising: encoding-degree-of-difficulty detecting means fordetecting a parameter indicating an encoding degree of difficulty fromsupplied image data; parameter calculating means for calculating aparameter required to determine block distortion from supplied imagedata; block distortion determining means for determining blockdistortion in accordance with a result of detection of the parameterindicating the encoding degree of difficulty and a result of thecalculation for obtaining the parameter; correction-value calculatingmeans for calculating a correction value for reducing block distortion;and means for subjecting supplied image data to a correction using acorrection value corresponding to a result of the determination of blockdistortion so as to produce an output.
 15. A block-distortion reducingapparatus according to claim 14, further comprising switching andselection means for performing switching between the corrected signaland supplied image data in accordance with a result of the determinationcommunicated from said block-distortion determining means.
 16. Ablock-distortion reducing apparatus according to claim 14, wherein saidencoding-degree-of-difficulty detection means performs a process forcalculating an amount of energy of high-frequency components in such away that high-frequency components of supplied image data are extractedso as to detect the parameter indicating the encoding degree ofdifficulty.
 17. A block-distortion reducing apparatus according to claim14, wherein encoding-degree-of-difficulty detection means performs amotion detection process to detect the motion of supplied image data soas to detect the parameter indicating the encoding degree of difficulty.18. A block-distortion reducing apparatus according to claim 14, whereinsaid encoding-degree-of-difficulty detection means performs a motiondetection process to detect the motion of supplied image data and aprocess for calculating an amount of energy of high-frequency componentsin such a way that high-frequency components of supplied image data areextracted so as to detect the parameter indicating the encoding degreeof difficulty.
 19. A block-distortion reducing apparatus according toclaim 14, further comprising decoding means for subjecting a suppliedbit stream to a decoding process for the purpose of obtaining suppliedimage data, wherein said decoding means subjects supplied image data tothe decoding process and detects a motion vector difference signal andan IDCT coefficient contained in supplied image data; saidencoding-degree-of-difficulty detection means converts the motion vectordifference signal and the IDCT coefficient into a parameter indicatingthe encoding degree of difficulty.
 20. A block-distortion reducingapparatus according to claim 14, further comprising correlationdetecting means for detecting correlation of a boundary among blocks,wherein said block-distortion determining means uses the correlationdetected by said correlation detecting means to determine blockdistortion, and said correction-value calculating means use thecorrelation detected by said correlation detecting means to calculatethe correction value.
 21. A block-distortion reducing apparatusaccording to claim 16, wherein the high-frequency components are edgecomponents of supplied image data, and the process for calculating theenergy amount of the high-frequency components is an edge extractingprocess.
 22. A block-distortion reducing apparatus according to claim16, wherein said correction-value calculating means uses a parameter onthe basis of a result of the extraction of the high-frequency componentsin said process for calculating the energy amount of the high-frequencycomponents to calculate the correction value.
 23. A block-distortionreducing apparatus according to claim 17, wherein said correction-valuecalculating means uses the parameter on the basis of the motiondetection performed in the motion detecting process to calculate thecorrection value.
 24. A block-distortion reducing apparatus according toclaim 18, wherein said correction-value calculating means uses theparameter on the basis of a result of the extraction of thehigh-frequency components in the process for calculating the energyamount of the high-frequency components and a result of the motiondetection performed in said motion detecting process.
 25. Ablock-distortion reducing apparatus according to claim 19, wherein saidblock-distortion determining means uses the parameter on the basis ofthe motion vector difference signal and the IDCT coefficient detected bysaid decoding means to determine block distortion, and saidcorrection-value calculating means uses the parameter on the basis ofthe motion vector signal and the IDCT coefficient detected by saiddecoding means to calculate the correction value.
 26. An encoding methodcomprising: a block-distortion reducing step for reducing blockdistortion caused from block encoding/decoding of image data, andincluding a decoding step for decoding a supplied bit stream into imagedata; and an encoding step for encoding image data obtained in saidblock-distortion reducing step into a bit stream, wherein the suppliedbit stream has been encoded by using block encoding and motioncompensation, said decoding step is performed such that a motion vectorof the motion compensation is extracted from the supplied bit stream,and said block-distortion reducing step is performed such that themotion vector obtained in said decoding step is used to perform adaptiveblock-distortion reduction.
 27. An encoding method according to claim26, wherein the supplied bit stream is in the form conforming to MPEG(Moving Pictures Experts Group) standard.
 28. An encoding apparatuscomprising: block-distortion reducing means for reducing blockdistortion caused from block encoding/decoding of image data, includingdecoding means for decoding a supplied bit stream into image data; andencoding means for encoding image data obtained by said block-distortionreducing means into a bit stream, wherein the supplied bit stream hasbeen encoded by using block encoding and motion compensation, saiddecoding means extracts the motion vector of the motion compensationfrom the supplied bit stream, and said block-distortion reducing meansuses the motion vector obtained by said decoding means to performadaptive block-distortion reduction.
 29. An encoding apparatus accordingto claim 28, wherein the supplied bit stream is in the form conformingto MPEG (Moving Pictures Experts Group) standard.